'\"macro stdmacro
.\"
.\" Copyright (c) 2013-2019 Red Hat.
.\" Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.TH PMLOGGER_DAILY 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmlogger_daily\f1 \- administration of Performance Co-Pilot archive files
.SH SYNOPSIS
.B $PCP_BINADM_DIR/pmlogger_daily
[\f3\-DEfKMNnoPpQrRVzZ?\f1]
[\f3\-c\f1 \f2control\f1]
[\f3\-k\f1 \f2time\f1]
[\f3\-l\f1 \f2logfile\f1]
[\f3\-m\f1 \f2addresses\f1]
[\f3\-s\f1 \f2size\f1]
[\f3\-t\f1 \f2want\f1]
[\f3\-x\f1 \f2time\f1]
[\f3\-X\f1 \f2program\f1]
[\f3\-Y\f1 \f2regex\f1]
.SH DESCRIPTION
.B pmlogger_daily
and the related
.BR pmlogger_check (1)
tools along with
associated control files (see
.BR pmlogger.control (5))
may be used to
create a customized regime of administration and management for
historical archives of performance data within the
Performance Co-Pilot (see
.BR PCPIntro (1))
infrastructure.
.PP
.B pmlogger_daily
is intended to be run once per day, preferably in the early morning, as
soon after midnight as practicable.
Its task is to aggregate, rotate and perform general housekeeping one or
more sets of PCP archives.
.PP
To accommodate the evolution of PMDAs and changes in production
logging environments,
.B pmlogger_daily
is integrated with
.BR pmlogrewrite (1)
to allow optional and automatic rewriting of archives before merging.
If there are global rewriting rules to be applied across all archives
mentioned in the control file(s), then create the directory
.I $PCP_SYSCONF_DIR/pmlogrewrite
and place any
.BR pmlogrewrite (1)
rewriting rules in this directory.
For rewriting rules that are specific to only one family of archives,
use the directory name from the control file(s) \- i.e. the
.I fourth
field \- and create a file, or a directory, or a symbolic link named
.I pmlogrewrite
within this directory
and place the required rewriting rule(s) in the
.I pmlogrewrite
file or in files
within the
.I pmlogrewrite
subdirectory.
.B pmlogger_daily
will choose rewriting rules from the archive directory if they
exist, else rewriting rules from
.I $PCP_SYSCONF_DIR/pmlogrewrite
if that directory exists, else no rewriting is attempted.
.PP
As an alternate mechanism, if the file
.I $PCP_LOG_DIR/pmlogger/.NeedRewrite
exists when
.B pmlogger_daily
starts then this is treated the same as specifying
.B \-R
on the command line and
.I $PCP_LOG_DIR/pmlogger/.NeedRewrite
will be removed once all the rewriting has been done.
.SH OPTIONS
.TP 5
\fB\-c\fR \fIcontrol\fR, \fB\-\-control\fR=\fIcontrol\fR
Both
.B pmlogger_daily
and
.BR pmlogger_check (1)
are controlled by PCP logger control file(s)
that specifies the
.BR pmlogger (1)
instances to be managed.
The default
.I control
file is
.IR $PCP_PMLOGGERCONTROL_PATH ,
but an alternate may be specified using the
.B \-c
option.
If the directory
.I $PCP_PMLOGGERCONTROL_PATH\fB.d\fR
(or
.I control\fB.d\fR
from the
.B \-c
option) exists, then the contents of any additional
.I control
files therein will be appended to the main control file (which must exist).
.TP 5
\fB\-D\fR, \fB\-\-noreport\fR
Do not perform the conditional
.BR pmlogger_daily_report (1)
processing as described below.
.TP 5
\fB\-E\fR, \fB\-\-expunge\fR
This option causes
.B pmlogger_daily
to pass the
.B \-E
flag to
.BR pmlogger_merge (1)
in order to expunge metrics with metadata inconsistencies and continue
rather than fail.
This is intended for automated daily archive rotation where it is highly desirable
for unattended daily archive merging, rewriting and compression to succeed.
For further details, see
.BR pmlogger_merge (1)
and description for the
.B \-x
flag in
.BR pmlogextract (1).
.TP 5
\fB\-f\fR, \fB\-\-force\fR
This option forces
.B pmlogger_daily
to attempt compression actions.
Using this option in production is not recommended.
.TP 5
\fB\-k\fR \fItime\fR, \fB\-\-discard\fR=\fItime\fR
After some period, old PCP archives are discarded.
.I time
is a time specification in the syntax of
.BR find-filter (1),
so
\fIDD\fR[\fB:\fIHH\fR[\fB:\fIMM\fR]].
The optional
.I HH
(hours) and
.I MM
(minutes) parts are 0 if not specified.
By default the
.I time
is
.B 14:0:0
or 14 days, but may be changed using
this option.
.RS
.PP
Some special values are recognized for the
.IR time ,
namely
.B 0
to keep no archives beyond the the ones being currently written by
.BR pmlogger (1),
and
.B forever
or
.B never
to prevent any archives being discarded.
.PP
The
.I time
can also be set using the
.B $PCP_CULLAFTER
variable, set in either the environment or in a control file.
If both
.B $PCP_CULLAFTER
and
.B \-k
specify different values for
.I time
then the environment variable value is used and a warning is issued,
i.e. if
.B $PCP_CULLAFTER
is set in the
.I control
file, it overrides
.B \-k
given on the command line.
.PP
Note that the semantics of
.I time
are that it is measured from the time of last modification of each
archive, and not from the original archive creation date.
This has subtle implications for compression (see below) \- the
compression process results in the creation of new archive files
which have new modification times.
In this case, the
.I time
period (re)starts from the time of compression.
.RE
.TP 5
\fB\-K\fR
When this option is specified for
.B pmlogger_daily
then only the compression tasks are attempted, so no
.BR pmlogger
rotation, no culling, no rewriting, etc.
When
.B \-K
is used and a
.I period
of
.B 0
is in effect
(from
.B \-x
on the command line or
.B $PCP_COMPRESSAFTER
in the environment or via the
.I control
file)
this is intended for environments where compression
of archives is desired before the scheduled daily processing
happens.
To achieve this, once
.BR pmlogger_check (1)
has completed regular processing, it calls
.B pmlogger_daily
with just the
.B \-K
option.
Provided
.B $PCP_COMPRESSAFTER
is set to
.B 0
along with any other required compression options to match the
scheduled invocation of
.BR pmlogger_daily ,
then this will compress all volumes except the ones being currently
written by
.BR pmlogger (1).
If
.B $PCP_COMPRESSAFTER
is set to a value greater than zero, then manually running
.B pmlogger_daily
with the
.B \-x
option may be used to compress volumes that are younger than the
.B $PCP_COMPRESSAFTER
time.
This may be used to reclaim filesystem space by compressing volumes
earlier than they would have otherwise been compressed.
Note that since the default value of
.B $PCP_COMPRESSAFTER
is 0 days, the
.B \-x
option has no effect unless the
.I control
file has been edited and
.B $PCP_COMPRESSAFTER
has been set to a value greater than
.BR 0 .
.RS
.PP
The default value of
.B $PCP_COMPRESSAFTER
is
.B 0
if
.BR zstd (1)
is installed, or if
.BR xz (1)
is installed and the
.I lzma
library is available (as reported for the
.B transparent_decompress
option by
.BR pmconfig (1)).
Otherwise the default value of
.B $PCP_COMPRESSAFTER
is
.BR never .
.RE
.TP 5
\fB\-l\fR \fIfile\fR, \fB\-\-logfile\fR=\fIfile\fR
In order to ensure that mail is not unintentionally sent when these
scripts are run from
.BR cron (8)
or
.BR systemd (1)
diagnostics are always sent to log files.
By default, this file is
.I $PCP_LOG_DIR/pmlogger/pmlogger_daily.log
but this can be changed using the
.B \-l
option.
If this log
.I file
already exists when the script starts, it will be
renamed with a
.I .prev
suffix (overwriting any log file saved earlier) before diagnostics
are generated to the log file.
The
.B \-l
and
.B \-t
options cannot be used together.
.TP 5
\fB\-m\fR \fIaddresses\fR, \fB\-\-mail\fR=\fIaddresses\fR
Use of this option causes
.B pmlogger_daily
to construct a summary of the ``notices'' file entries which were
generated in the last 24 hours, and e-mail that summary to the set of
space-separated
.IR addresses .
This daily summary is stored in the file
.IR $PCP_LOG_DIR/NOTICES.daily ,
which will be empty when no new ``notices'' entries were made in the
previous 24 hour period.
.TP 5
\fB\-M\fR
This option may be used to disable archive merging (or renaming) and rewriting
(\c
.B \-M
implies
.BR \-r ).
This is most useful in cases where the archives are being incrementally
copied to a remote repository, e.g. using
.BR rsync (1).
Merging, renaming and rewriting all risk an increase in the synchronization
load, especially immediately after
.B pmlogger_daily
has run, so
.B \-M
may be useful in these cases.
.TP 5
\fB\-N\fR, \fB\-\-showme\fR
This option enables a ``show me'' mode, where the programs actions are
echoed, but not executed, in the style of ``make \-n''.
Using
.B \-N
in conjunction with
.B \-V
maximizes the diagnostic capabilities for debugging.
.TP 5
\fB\-n\fR, \fB\-\-noerror\fR
Force the exit status to be 0 other than for catastrophic errors.
Useful when called from a
.BR systemd (1)
service or timer unit so that the associated unit is not marked
as failed in a way that would prevent subsequent execution from
.BR systemd (1).
.TP 5
\fB\-o\fR
By default all possible archives will be merged.
This option reinstates the old behaviour in which only yesterday's archives
will be considered as merge candidates.
In the special case where only a single input archive
needs to be merged,
.BR pmlogmv (1)
is used to rename the archive, otherwise
.BR pmlogger_merge (1)
is used to merge all of the archives for a single host and a single day into a new
PCP archive and the individual archives are removed.
.TP 5
\fB\-P\fR, \fB\-\-noproxy\fR
By default, in addition to the archives created by local
.BR pmlogger (1)
instances below the
.I $PCP_ARCHIVE_DIR/<hostname>
directories
.B pmlogger_daily
will also process the archives that have been ``pushed'' from a
remote
.BR pmlogger (1)
via the local
.BR pmproxy (1)
and stored below the
.I $PCP_LOG_DIR/pmproxy/<hostname>
directories.
The
.B \-P
option prevents the processing of the archives from
.BR pmproxy (1).
.TP 5
\fB\-p\fR
If this option is specified for
.B pmlogger_daily
then the status of the daily processing is polled and if the daily
.BR pmlogger (1)
rotation, culling, rewriting, compressing, etc.
has not been done in the last 24 hours then it is done now.
The intent is to have
.B pmlogger_daily
called regularly with the
.B \-p
option (at 30 mins past the hour, every hour in the default
.BR cron (8)
set up) to ensure daily processing happens as soon as possible if
it was missed at the regularly scheduled time (which is 00:10
by default), e.g. if the system was down or suspended at that
time.
With this option
.B pmlogger_daily
simply exits if the previous day's processing has already been
done.
Note that this option is not used on platforms supporting
.BR systemd (1)
because the
.B pmlogger_daily.timer
service unit specifies a timer setting with
.BR Persistent=true .
The
.B \-K
and
.B \-p
options to
.B pmlogger_daily
are mutually exclusive.
.TP 5
\fB\-Q\fR, \fB\-\-proxyonly\fR
The inverse of
.B \-P
described above, namely
only process the archives that have been ``pushed'' from a
remote
.BR pmlogger (1)
via the local
.BR pmproxy (1)
and ignore
all archives created by local
.BR pmlogger (1)
instances below the
.I $PCP_ARCHIVE_DIR/<hostname>
directories.
.TP 5
\fB\-r\fR, \fB\-\-norewrite\fR
This command line option acts as an override and prevents all archive
rewriting with
.BR pmlogrewrite (1)
independent of the presence of any rewriting rule files or directories.
.TP 5
\fB\-R\fR, \fB\-\-rewriteall\fR
Sometimes PMDA changes require
.I all
archives to be rewritten,
not just the ones involved
in any current merging.
This is required for example after a PCP upgrade where a new version of an
existing PMDA has revised metadata.
The
.B \-R
command line forces this universal-style of rewriting.
The
.B \-R
option to
.B pmlogger_daily
is mutually exclusive with both the
.B \-r
and
.B \-M
options.
.TP 5
\fB\-s\fR \fIsize\fR, \fB\-\-rotate\fR=\fIsize\fR
If the PCP ``notices'' file (\c
.IR $PCP_LOG_DIR/NOTICES )
is larger than 20480 bytes,
.B pmlogger_daily
will rename the file with a ``.old'' suffix, and start
a new ``notices'' file.
The rotate threshold may be changed from 20480 to
.I size
bytes using the
.B \-s
option.
.TP 5
\fB\-t\fR \fIperiod\fR
To assist with debugging or diagnosing intermittent failures the
.B \-t
option may be used.
This will turn on very verbose tracing (\c
.BR \-VV )
and capture the trace output in a file named
.IR $PCP_LOG_DIR/pmlogger/daily.datestamp.trace ,
where
.I datestamp
is the time
.B pmlogger_daily
was run in the format YYYYMMDD.HH.MM.
In addition, the
.I period
argument will ensure that trace files created with
.B \-t
will be kept for
.I period
days and then discarded.
.TP 5
\fB\-V\fR, \fB\-\-verbose\fR
The output from the
.BR cron (8)
execution of the scripts may be extended using the
.B \-V
option to the scripts which will enable verbose tracing of their activity.
By default the scripts generate no output unless some error or warning
condition is encountered.
A second
.B \-V
increases the verbosity.
Using
.B \-N
in conjunction with
.B \-V
maximizes the diagnostic capabilities for debugging.
.TP 5
\fB\-x\fR \fItime\fR, \fB\-\-compress\-after\fR=\fItime\fR
Archive data files can optionally be compressed after some period
to conserve disk space.
This is particularly useful for large numbers of
.BR pmlogger (1)
processes under the control of
.BR pmlogger_daily .
.RS
.PP
.I time
is a time specification in the syntax of
.BR find-filter (1),
so
\fIDD\fR[\fB:\fIHH\fR[\fB:\fIMM\fR]].
The optional
.I HH
(hours) and
.I MM
(minutes) parts are 0 if not specified.
.PP
Some special values are recognized for the
.IR time ,
namely
.B 0
to apply compression as soon as possible, and
.B forever
or
.B never
to prevent any compression being done.
.PP
If
.B transparent_decompress
is enabled when
.I libpcp
was built
(can be checked with the
.BR pmconfig (1)
.B \-L
option),
then the default behaviour is compression ``as soon as possible''.
Otherwise the default behaviour is to
.B not
compress files (which matches the historical default behaviour in
earlier PCP releases).
.PP
The
.I time
can also be set using the
.B $PCP_COMPRESSAFTER
variable, set in either the environment or in a
.I control
file.
If both
.B $PCP_COMPRESSAFTER
and
.B \-x
specify different values for
.I time
then the environment variable value is used and a warning is issued.
For important other detailed notes concerning volume compression, see the
.B \-K
and
.B \-k
options (above).
.RE
.TP 5
\fB\-X\fR \fIprogram\fR, \fB\-\-compressor\fR=\fIprogram\fR
This option specifies the program to use for compression \- by default
this is
.BR pmlogcompress (1).
The environment variable
.B $PCP_COMPRESS
may be used as an alternative mechanism to define
.IR program .
If both
.B $PCP_COMPRESS
and
.B \-X
specify different compression programs
then the environment variable value is used and a warning is issued.
.TP 5
\fB\-Y\fR \fIregex\fR, \fB\-\-regex\fR=\fIregex\fR
This option allows a regular expression to be specified causing files in
the set of files matched for compression to be omitted \- this allows
only the data file to be compressed, and also prevents the program from
attempting to compress it more than once.
The default
.I regex
is
.br
"\e.(index|Z|gz|bz2|zip|xz|lzma|lzo|lz4|zst)$"
.br
\- such files are
filtered using the
.B \-v
option to
.BR egrep (1).
The environment variable
.B $PCP_COMPRESSREGEX
may be used as an alternative mechanism to define
.IR regex .
If both
.B $PCP_COMPRESSREGEX
and
.B \-Y
specify different values for
.I regex
then the environment variable value is used and a warning is issued.
.TP 5
\fB\-z\fR
This option causes
.B pmlogger_daily
to
.B not
\&``re-exec'', see
.BR pmlogger (1),
when it would otherwise choose to do so
and is intended only for QA testing.
.TP 5
\fB\-Z\fR
This option causes
.B pmlogger_daily
to ``re-exec'', see
.BR pmlogger (1),
whenever that is possible
and is intended only for QA testing.
.TP 5
\fB\-?\fR, \fB\-\-help\fR
Display usage message and exit.
.SH CALLBACKS
Additionally
.B pmlogger_daily
supports the following ``hooks'' to allow auxiliary operations to
be performed at key points in the daily processing of the archives.
These callbacks are controlled via variables that may be set
in the environment or via the
.I control
file.
.PP
Note that merge callbacks and autosaving described below are
.B not
enabled when only compression tasks are being attempted, i.e. when
.B \-K
command line option is used.
.PP
All of the callback script execution and the autosave file moving
will be executed as the non-privileged user ``pcp'' and group ``pcp'',
so appropriate permissions may need to have been set up in advance.
.TP 5
.B $PCP_MERGE_CALLBACK
As each day's archive is created by merging and before any
compression takes place, if
.B $PCP_MERGE_CALLBACK
is defined,
then it is assumed to be a script that will be called with
one argument being the name of the archive (stripped of any suffixes),
so something of the form
.IR /some/directory/path/YYYYMMDD .
The script needs to be either a full pathname, or something that will
be found on the shell's
.B $PATH .
The callback script will be run in the foreground, so
.B pmlogger_daily
will wait for it to complete.
.RS 5
.PP
If the control file contains more than one
.B $PCP_MERGE_CALLBACK
specification then these will be run serially in the order
they appear in the control file.
If
.B $PCP_MERGE_CALLBACK
is defined in the environment when
.B pmlogger_daily
is run, this is treated as though this option was the first in the control
file, i.e. it will be run before any merge callbacks mentioned in the control
file.
.PP
If the
.I pcp-zeroconf
packages is installed,
then a special merge callback is added to call
.BR pmlogger_daily_report (1)
first, before any other merge callback options, but
.B only
for the primary
.BR pmlogger (1)
instance.
Refer to
.BR pmlogger_daily_report (1)
for an explanation of the
.I pcp-zeroconf
requirements.
.PP
If
.B pmlogger_daily
is in ``catch up'' mode (more than one day's worth of archives
need to be combined) then each call back is executed once for
each day's archive that is generated.
.PP
A typical use might be to produce daily reports from the PCP archive which
needs to wait until the archive has been created, but is more efficient if
it is done before any potential compression of the archive.
.RE
.TP 5
.B $PCP_COMPRESS_CALLBACK
If
.B pmlogger_daily
is run with
.B \-x
.B 0
or
.BR $PCP_COMPRESSAFTER=0 ,
then compression is done immediately after merging.
As each day's archive is compressed, if
.B $PCP_COMPRESS_CALLBACK
is defined,
then it is assumed to be a script that will be called with
one argument being the name of the archive (stripped of any suffixes),
so something of the form
.IR /some/directory/path/YYYYMMDD .
The script needs to be either a full pathname, or something that will
be found on the shell's
.B $PATH .
The callback script will be run in the foreground, so
.B pmlogger_daily
will wait for it to complete.
.RS 5
.PP
If the control file contains more than one
.B $PCP_COMPRESS_CALLBACK
specification then these will be run serially in the order
they appear in the control file.
If
.B $PCP_COMPRESS_CALLBACK
is defined in the environment when
.B pmlogger_daily
is run, this is treated as though this option was the first in the control
file, i.e. it will be run first.
.PP
If
.B pmlogger_daily
is in ``catch up'' mode (more than one day's worth of archives
need to be compressed) then each call back is executed once for
each day's archive that is compressed.
.PP
A typical use might be to keep recent archives in uncompressed form
for efficient querying, but move the older archives to some other storage
location once the compression has been done.
.RE
.TP 5
.B $PCP_AUTOSAVE_DIR
Once the merging and possible compression has been done by
.BR pmlogger_daily ,
if
.B $PCP_AUTOSAVE_DIR
is defined then all of the physical files that make up one day's
archive will be moved (autosaved) to the directory specified by
.B $PCP_AUTOSAVE_DIR.
.RS 5
.PP
The basename of the archive is used to set the reserved words
.B DATEYYYY
(year),
.B DATEMM
(month) and
.B DATEDD
(day) and these (along with
.BR LOCALHOSTNAME )
may appear literally in
.BR $PCP_AUTOSAVE_DIR ,
and will be substituted at execution time to generate the destination
directory name.  For example:
.ft CR
.in +2n
$PCP_AUTOSAVE_DIR=/gpfs/LOCALHOSTNAME/DATEYYYY/DATEMM-DATEDD
.br
.PP
Note that these ``date'' reserved words correspond to the date on
which the archive data was collected, not the date that
.B pmlogger_daily
was run.
.PP
If
.B $PCP_AUTOSAVE_DIR
(after
.B LOCALHOSTNAME
and ``date'' substitution)
does not exist then
.B pmlogger_daily
will attempt to create it (along with any parent directories that
do not exist).
Just be aware that this directory creation runs under
the uid of the user ``pcp'', so directories along the path
to
.B $PCP_AUTOSAVE_DIR
may need to be writeable by this non-root user.
.PP
By ``move'' the archives we mean a paranoid checksum-copy-checksum-remove
(using the
.B \-c
option for
.BR pmlogmv (1))
that will bail if the copy fails or the checksums do not match
(the archives are important so we cannot risk something like a
full filesystem or a permissions issue messing with the copy process).
.PP
If
.B pmlogger_daily
is in ``catch up'' mode (more than one day's worth of archives
need to be combined) then the archives for more than one day could
be copied in this step.
.PP
A typical use might be to create PCP archives on a local
filesystem initially, then once all the data for a single
day has been collected and merged, migrate that day's archive
to a shared filesystem or a remote filesystem.
This may allow automatic backup to off-site storage and/or
reduce the number of I/O operations and filesystem metadata
operations on the (potentially slower) non-local filesystem.
.RE
.SH CONFIGURATION
Refer to
.BR pmlogger.control (5)
for a description of the contol file(s) that are used to
control which
.BR pmlogger (1)
instances and which archives are managed by
.BR pmlogger_check (1)
and
.BR pmlogger_daily .
.PP
Additionally, when
.BR pmproxy (1)
archives are being processed, environment variables like
.B $PCP_CULLAFTER
or
.B $PCP_COMPRESSAFTER
can be set either for all remote hosts via the file
.I $PCP_LOG_DIR/pmproxy/control
and/or per-host via files named
.IR $PCP_LOG_DIR/pmproxy/<hostname>/control .
.SH FILES
.TP 5
.I $PCP_VAR_DIR/config/pmlogger/config.default
default
.BR pmlogger (1)
configuration file location for the local primary logger, typically
generated automatically by
.BR pmlogconf (1).
.TP 5
.I $PCP_ARCHIVE_DIR/<hostname>
default location for archives of performance information collected from the host
.I hostname
.TP 5
.I $PCP_ARCHIVE_DIR/<hostname>/lock
transient lock file to guarantee mutual exclusion during
.BR pmlogger (1)
administration for the host
.I hostname
\- if present, can be safely removed if neither
.B pmlogger_daily
nor
.BR pmlogger_check (1)
are running
.TP 5
.I $PCP_ARCHIVE_DIR/<hostname>/Latest
PCP archive folio created by
.BR mkaf (1)
for the most recently launched archive containing performance metrics from
the host
.I hostname
.TP 5
.I $PCP_LOG_DIR/NOTICES
PCP ``notices'' file used by
.BR pmie (1)
and friends
.TP 5
.I $PCP_LOG_DIR/pmlogger/pmlogger_daily.log
if the previous execution of
.B pmlogger_daily
produced any output it is saved here.
The normal case is no output in which case the file does not exist.
.TP 6
.I $PCP_ARCHIVE_DIR/SaveLogs
if this directory exists,
then the log file from the
.B \-l
argument for
.B pmlogger_daily
will be saved in this directory with the name of the format
<date>-\fBpmlogger_daily\fP.\fBlog\fP.<pid> or
<date>-\fBpmlogger_daily-K\fP.\fBlog\fP.<pid>
This allows the log file to be inspected at a later time, even if
several
.BR pmlogger_daily
executions have been launched in the interim.
Because the PCP archive management tools run under
the $PCP_USER account ``pcp'',
.I $PCP_ARCHIVE_DIR/SaveLogs
typically needs to be owned by the user ``pcp''.
.TP 7
.I $PCP_ARCHIVE_DIR/<hostname>/SaveLogs
if this directory exists,
then the log file from the
.B \-l
argument
of a newly launched
.BR pmlogger (1)
for
.I hostname
will be saved in this directory with the name
.IB archive .log
where
.I archive
is the basename of the associated
.BR pmlogger (1)
PCP archive files.
This allows the log file to be inspected at a later time, even if
several
.BR pmlogger (1)
instances for
.I hostname
have been launched in the interim.
Because the PCP archive management tools run under
the uid of the user ``pcp'',
.I $PCP_ARCHIVE_DIR/<hostname>/SaveLogs
typically needs to be owned by the user ``pcp''.
.TP 8
.I $PCP_LOG_DIR/pmlogger/.NeedRewrite
if this file exists, then this is treated as equivalent to using
.B \-R
on the command line and the file will be removed once all rewriting
has been done.
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fP are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fP contains the local values for these variables.
The \fB$PCP_CONF\fP variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fP(5).
.SH "COMPATIBILITY ISSUES"
Earlier versions of
.B pmlogger_daily
used
.BR find (1)
to locate files for compressing or culling and the
.B \-k
and
.B \-x
options took only integer values to mean ``days''.
The semantics of this was quite loose given that
.BR find (1)
offers different precision and semantics across platforms.
.PP
The current implementation of
.B pmlogger_daily
uses
.BR find-filter (1)
which provides high precision intervals and semantics that are
relative to the time of execution and are consistent across
platforms.
.SH SEE ALSO
.BR PCPIntro (1),
.BR egrep (1),
.BR find-filter (1),
.BR pmconfig (1),
.BR pmlc (1),
.BR pmlogcompress (1),
.BR pmlogconf (1),
.BR pmlogctl (1),
.BR pmlogextract (1),
.BR pmlogger (1),
.BR pmlogger_check (1),
.BR pmlogger_daily_report (1),
.BR pmlogger_merge (1),
.BR pmlogmv (1),
.BR pmlogrewrite (1),
.BR pmproxy (1),
.BR systemd (1),
.BR xz (1),
.BR zstd (1)
and
.BR cron (8).

.\" control lines for scripts/man-spell
.\" +ok+ DATEDD DATEMM DATEYYYY DD HH NeedRewrite
.\" +ok+ SaveLogs VV
.\" +ok+ YYYYMMDD autosave autosaved autosaving contol datestamp
.\" +ok+ gpfs {from gpfs/LOCALHOSTNAME/DATEYYYY/DATEMM-DATEDD}
.\" +ok+ lz lzma lzo zst {from compression suffixes}
.\" +ok+ zstd {from zstd(1)}
.\" +ok+ prev {from .prev suffix} transparent_decompress writeable zeroconf
